package com.jk.admin.dao;

import com.jk.admin.entity.ProductSeckill;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SellsDao {

    @Select("select * from instant_buy_item")
    List<ProductSeckill> getSells();

    @Delete("delete from instant_buy_item where item_id = ${id}")
    void delSells(Integer id);

    @Insert("insert into instant_buy_item values(#{item_id},#{name},#{i_img}," +
            "#{number},#{initial_price}," +
            "#{buy_price},#{sell_point},current_timestamp,#{start_time},#{end_time})")
    void addSells(ProductSeckill pro);
}
